#! /usr/bin/python

peter = []
for a in range(1, 5):
    for b in range(1, 5):
	for c in range(1, 5):
	    for d in range(1, 5):
		for e in range(1, 5):
		    for f in range(1, 5):
			for g in range(1, 5):
			    for h in range(1, 5):
				for i in range(1, 5):
				    peter.append(a+b+c+d+e+f+g+h+i)

colin = []
for a in range(1, 7):
    for b in range(1, 7):
	for c in range(1, 7):
	    for d in range(1, 7):
		for e in range(1, 7):
		    for f in range(1, 7):		
			colin.append(a+b+c+d+e+f)

pl = 4**9
cl = 6**6

pp = []
for i in range(9, 37):
    pp.append(peter.count(i))
cp = []
for i in range(6, 37):
    cp.append(colin.count(i))

ss = cp[0] + cp[1] + cp[2]
beat = 0
for i in range(len(pp)):
    beat += pp[i]*ss
    ss += cp[i+3]
	
print beat/float(pl*cl)

